<!--
 * @Author: your name
 * @Date: 2022-01-14 09:17:34
 * @LastEditTime: 2022-01-14 09:30:54
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \20220114\表单.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表单提交</title>
    <style>
        label{
            width: 80px;
            display: inline-block;
        }
    </style>
</head>
<body>
    <!-- action作用是往哪个接口地址提交数据 -->
    <!-- 表单提交的时候设置get方式，提交完数据是通过url地址栏进行提交 -->
    <!-- ?username=11111&password=22222 -->
    <form action="table.html" method="get">
        <label for="">用户名：</label><input type="text" name="username" id=""><br>
        <label for="">密码:</label><input type="password" name="password" id=""><br>
        <input type="submit" value="登录">
    </form>
    <!-- 表单提交的时候设置post方式，直接打包通过表单提交安全性比较高 -->
    <form action="table.html" method="post">
        <label for="">用户名：</label><input type="text" name="username" id=""><br>
        <label for="">密码:</label><input type="password" name="password" id=""><br>
        <input type="submit" value="登录">
    </form>
</body>
</html>